<html>
<head>
	<meta charset="UTF-8">
	<title>Controller父类</title>
</head>
<body>
	<?php 
require 'Home/ViewModel.php';
class Controller{
	protected $view;
	function __construct(){
		$c = isset($_GET['c'])?$_GET['c']:'index';
$m = isset($_GET['m'])?$_GET['m']:'index';
		$this->view=new ViewModel($c.'/'.$m);
			}
	function assign($variable,$value){
		$this->view->assign($variable,$value);
	}
	function display(){
		$this->view->display();
	}

}

	 ?>
</body>
</html>